<?php
    //header("Content-Type:text/html;charset=utf-8");
    date_default_timezone_set('PRC');
    $get_time = date("Y-m-d H:i:s", time());//时间


$url='http://'.$_SERVER['SERVER_NAME'].$_SERVER["REQUEST_URI"]; 
$href = GetCurl(dirname($url)."/momo/data/mo_index.php");
$kk= json_encode($href);
$resp1 = json_decode($kk);
$resp2 = json_decode($resp1,true);
$index = $resp2['index'];
for ($i = 0; $i <= count($index)-1; $i ++)
{

 //$put_time = $feedXml->channel->item->pubDate;
 //$php_time = strtotime($get_time) - strtotime($put_time);
 //文章输出
 if($php_time<2*60)
 {
    //返回一个
    echo "网站新帖，围观ing：</br></br>";
    echo "face13标题：" . $feedXml->channel->item->title . "</br>";
    echo "face30链接：" . $feedXml->channel->item->link . "</br></br>";
      echo "face29更多文章请访问：</br>http://www.huisai.top</br>";
    }

}


function GetCurl($url){
    $curl = curl_init();
    curl_setopt($curl,CURLOPT_RETURNTRANSFER,1);
    curl_setopt($curl,CURLOPT_URL, $url);
    curl_setopt($curl,CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); // 跳过证书检查
    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, true);  // 从证书中检查SSL加密算法是否存在
    $resp = curl_exec($curl);
    curl_close($curl);
    return $resp;
}
?>

